package com.ysy.api;


import com.ysy.config.FeignFormConfig;
import com.ysy.dto.DelFileReqDTO;
import com.ysy.persimmons.common.response.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(contextId ="StorageFeignApi",value = "storage",configuration = FeignFormConfig.class)
public interface StorageFeignApi {

    @PostMapping(value = "/file/upload",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public Response<?> uploadFile(@RequestPart(value = "file") MultipartFile file, Integer type);

    @PostMapping(value = "/file/del")
    public Response<?> delFile(@RequestBody DelFileReqDTO delFileReqDTO );
}
